home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / misc / bgui12.lha / docs / frameclass.doc < prev    next >
Text File  |  1995-05-21  |  9KB  |  316 lines

  1.  
  2.                File: frameclass.doc
  3.         Description: Frameclass documentation.
  4.           Copyright: (C) Copyright 1994-1995 Jaba Development.
  5.                      (C) Copyright 1994-1995 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. TABLE OF CONTENTS
  11.  
  12. frameclass/--background--
  13. frameclass/Methods
  14. frameclass/Attributes
  15.  
  16. frameclass/--background--                            frameclass/--background--
  17.  
  18.     NAME
  19.         Class:          frameclass
  20.         Superclass:     IMAGECLASS
  21.         Include File:   <libraries/bgui.h>
  22.  
  23.     FUNCTION
  24.         To  provide   a   general   framing  image.  It  has a set of built-in
  25.         framing  and  background  types  and  the  possibility  to  add  hooks
  26.         for custom frames and backgrounds.
  27.  
  28. frameclass/Methods                                          frameclass/Methods
  29.  
  30.     NEW METHODS
  31.         None.
  32.  
  33.     CHANGED METHODS
  34.         None.
  35.  
  36. frameclass/Attributes                                    frameclass/Attributes
  37.  
  38.     NAME
  39.         FRM_Type - ( ULONG )
  40.  
  41.     FUNCTION
  42.         Set  or  get  the  type of the used framing. You can select any of the
  43.         following types:
  44.  
  45.         FRTYPE_CUSTOM --  This is a custom framing type which is automatically
  46.                 set when you supply a framing hook.
  47.  
  48.         FRTYPE_BUTTON -- Standard button gadget frame.
  49.  
  50.         FRTYPE_RIDGE -- Standard string gadget frame.
  51.  
  52.         FRTYPE_DROPBOX -- Standard icon-dropbox frame.
  53.  
  54.         FRTYPE_NEXT -- Standard  NeXT  frame  which  basically  is an inverted
  55.                 (recessed) string gadget frame.
  56.  
  57.         FRTYPE_RADIOBUTTON -- Standard MX gadget frame.
  58.  
  59.         FRTYPE_XEN_BUTTON -- XEN style button frame.
  60.  
  61.         Default is FRTYPE_BUTTON. Applicability is (ISG).
  62.  
  63.     SEE ALSO
  64.         FRM_CustomHook
  65.  
  66.     NAME
  67.         FRM_CustomHook, FRM_BackFillHook -- ( struct Hook * )
  68.  
  69.     FUNCTION
  70.         Set or get custom framing and/or backfilling hooks.  These  hooks  are
  71.         called as follows:
  72.  
  73.         rc = hookFunc( hook, object, message );
  74.         D0             A0    A2      A1
  75.  
  76.         The  message  packet  can  be  a  pointer  to  any  of  the  following
  77.         structures:
  78.  
  79.         struct FrameDrawMsg {
  80.                 ULONG             fdm_MethodID; /* FRM_RENDER */
  81.                 struct RastPort  *fdm_RPort;
  82.                 struct DrawInfo  *fdm_DrawInfo;
  83.                 struct Rectangle *fdm_Bounds;
  84.                 UWORD             fdm_State;
  85.         };
  86.  
  87.         fdm_RPort -- This points to the RastPort in which the frame/background
  88.                 must be rendered.
  89.  
  90.         fdm_DrawInfo --  This  points  to  a  DrawInfo structure as defined in
  91.                 <intuition/screens.h>
  92.  
  93.         fdm_Bounds -- This points to a Rectangle structure in which the bounds
  94.                 of the frame/background are stored.
  95.  
  96.         fdm_State -- This holds the state in which you should render the frame
  97.                 or background.  Please  refer  to <intuition/imageclass.h> for
  98.                 more information about rendering styles.
  99.  
  100.         The  FrameDrawMsg  is  sent to both the custom and backfill hooks when
  101.         they must render.
  102.  
  103.         struct ThicknessMsg {
  104.                 ULONG             tm_MethodID; /* FRM_THICKNESS */
  105.                 struct {
  106.                         UBYTE    *Horizontal;
  107.                         UBYTE    *Vertical;
  108.                 }                 tm_Thickness;
  109.                 BOOL              tm_Thin;
  110.         };
  111.  
  112.         tm_Thickness -- In  this  field  you  must store the thickness  of the
  113.                 frame lines. The thickness requested is the width in pixels of
  114.                 the left OR right border (Horizontal) and the height in pixels
  115.                 of the top OR bottom border (Vertical).
  116.  
  117.         tm_Thin -- This field is added in V38 of the library.  Do  not attempt
  118.                 to read it with lower versions of the  library!  When  set  to
  119.                 TRUE you must give the thickness of  the frame  when it  is in
  120.                 thin (FRM_ThinFrame) mode.
  121.  
  122.         The ThicknessMsg is only sent to the custom frame hook.
  123.  
  124.         The hook routines must return any of the following return codes:
  125.  
  126.         FRC_OK -- OK. Message understood and executed.
  127.  
  128.         FRC_UNKNOWN -- Message not understood. The class will default in  this
  129.                 case.
  130.  
  131.         Defaults are NULL. Applicability is (ISG)
  132.  
  133.     SEE ALSO
  134.         <intuition/screens.h>, <intuition/imageclass.h>
  135.  
  136.     NAME
  137.         FRM_Title -- ( STRPTR )
  138.  
  139.     FUNCTION
  140.         Set  or  get  the  frame  title.  Each  frame can have a title in it's
  141.         top-border. With this attribute you set that title.
  142.  
  143.         Default is NULL. Applicability is (ISG).
  144.  
  145.     SEE ALSO
  146.         FRM_TextAttr
  147.  
  148.     NAME
  149.         FRM_TextAttr -- ( struct TextAttr * )
  150.  
  151.     FUNCTION
  152.         Set  or  get  the  font that is used to render the frame title. Please
  153.         note  that  this font is opened width OpenFont() and must be available
  154.         in memory.
  155.  
  156.     SEE ALSO
  157.         FRM_Title
  158.  
  159.     NAME
  160.         FRM_Flags -- ( ULONG )
  161.  
  162.     FUNCTION
  163.         To initialize any of the following flags:
  164.  
  165.         FRF_EDGES_ONLY -- When  this  flag  is  set  only the frame border are
  166.                 rendered. The background isn't touched.
  167.  
  168.         FRF_RECESSED -- Normally the frame is raised.  With  this flag set the
  169.                 frame is recessed by default.
  170.  
  171.         FRF_CENTER_TITLE -- Normally the frame title is rendered with the text
  172.                 baseline on the top border of the frame. When this flag is set
  173.                 the title is cenetered on the top border of the frame.
  174.  
  175.         FRF_HIGHLIGHT_TITLE -- Normally the frame title is  rendered  with the
  176.                 TEXTPEN. When this flag is set the title is rendered using the
  177.                 HIGHLIGHTTEXTPEN.
  178.  
  179.         FRF_THIN_FRAME -- This  flag, when set,  will  halve  the  size of the
  180.                 vertical borders of the frame.  This  looks  a  lot  better on
  181.                 screens width a 1:1 aspect ratio.
  182.  
  183.         Default is 0. Applicability is (ISG).
  184.  
  185.     SEE ALSO
  186.         <intuition/screens.h>,    FRM_Title,    FRM_EdgesOnly,   FRM_Recessed,
  187.         FRM_CenterTitle, FRM_HighlightTitle, FRM_ThinFrame
  188.  
  189.     NAME
  190.         FRM_FrameWidth -- ( UBYTE )
  191.  
  192.     FUNCTION
  193.         Get the width in pixels of the left or right frame border.
  194.  
  195.         Applicability is (G).
  196.  
  197.     SEE ALSO
  198.         FRM_FrameHeight
  199.  
  200.     NAME
  201.         FRM_FrameHeight -- ( UBYTE )
  202.  
  203.     FUNCTION
  204.         Get the height in pixels of the top or bottom frame border.
  205.  
  206.         Applicability is (G).
  207.  
  208.     SEE ALSO
  209.         FRM_FrameWidth
  210.  
  211.     NAME
  212.         FRM_BackFill -- ( ULONG )
  213.  
  214.     FUNCTION
  215.         Set or get the built-in background type to use.  You can select any of
  216.         the following types:
  217.  
  218.         STANDARD_FILL -- Normal fill as you  would  expect  from the  selected
  219.                 frame type.
  220.  
  221.         SHINE_RASTER -- A raster with the SHINEPEN and BACKGROUNDPEN.
  222.  
  223.         SHADOW_RASTER -- A raster with the SHADOWPEN and BACKGROUNDPEN.
  224.  
  225.         SHINE_SHADOW_RASTER -- A raster with the SHINEPEN and SHADOWPEN.
  226.  
  227.         FILL_RASTER -- A raster with the FILLPEN and BACKGROUNDPEN.
  228.  
  229.         SHINE_FILL_RASTER -- A rster with the SHINEPEN and FILLPEN.
  230.  
  231.         SHADOW_FILL_RASTER -- A raster with the SHADOWPEN and FILLPEN.
  232.  
  233.         SHINE_BLOCK -- A SHINEPEN fill.
  234.  
  235.         SHADOWBLOCK -- A SHADOWPEN fill.
  236.  
  237.         Please  note  that  setting any of the above backfill types except for
  238.         STANDARD_FILL will override the FRM_BackFillHook.
  239.  
  240.         Default is STANDARD_FILL. Applicability is (ISG).
  241.  
  242.     SEE ALSO
  243.         <intuition/screens.h>, FRM_BackFillHook
  244.  
  245.     NAME
  246.         FRM_EdgesOnly -- ( BOOL )
  247.  
  248.     FUNCTION
  249.         Set or clear the FRF_EDGES_ONLY flags.
  250.  
  251.         Default is FALSE. Applicability is (ISG).
  252.  
  253.     SEE ALSO
  254.         FRM_Flags
  255.  
  256.     NAME
  257.         FRM_Recessed -- ( BOOL )
  258.  
  259.     FUNCTION
  260.         Set or clear the FRF_RECESSED flag.
  261.  
  262.         Default is FALSE. Applicability is (ISG).
  263.  
  264.     SEE ALSO
  265.         FRM_Flags
  266.  
  267.     NAME
  268.         FRM_CenterTitle - ( BOOL )
  269.  
  270.     FUNCTION
  271.         Set or clear the FRF_CENTER_TITLE flag.
  272.  
  273.         Default is FALSE. Applicability is (ISG).
  274.  
  275.     SEE ALSO
  276.         FRM_Flags
  277.  
  278.     NAME
  279.         FRM_HighlightTitle -- ( BOOL )
  280.  
  281.     FUNCTION
  282.         Set or clear the FRF_HIGHLIGHT_TITLE flag.
  283.  
  284.         Default is FALSE. Applicability is (ISG).
  285.  
  286.     SEE ALSO
  287.         FRM_Flags
  288.  
  289.     NAME
  290.         FRM_ThinFrame -- ( BOOL )
  291.  
  292.     FUNCTION
  293.         Set or clear the FRF_THIN_FRAME flag.
  294.  
  295.         Default is FALSE. Applicability is (ISG).
  296.  
  297.    SEE ALSO
  298.         FRM_Flags
  299.  
  300.    NAME
  301.         FRM_BackPen, FRM_BackDriPen, FRM_SelectedBackPen,
  302.         FRM_SelectedBackDriPen -- ( UWORD ) ** V39 **
  303.  
  304.    FUNCTION
  305.         To specify the background colors of a frame.  The FRM_xxPen attributes
  306.         must  be  used  to  specify  the  pen  number  of the used color.  The
  307.         FRM_xxxDriPen  attributes  must  be  used  to specify the DrawInfo pen
  308.         number to use. You can specify two colors. The background color of the
  309.         frame in a normal unselected  state  and  the  background color of the
  310.         frame in selected state.
  311.  
  312.         Specifying ~0 (-1) for the pens will deactivate the backfill color and
  313.         the class will fall back to the default coloring sceme.
  314.  
  315.         Defaults are ~0. Applicability is (ISG).
  316.